{% extends 'CaisseBundle::layout.html.twig' %} 
{% block body %} 
<div id="body_section">
    <div id="body_section_inner">
        <div class="contentPageWrapper">

            <!-- register form -->
            <div class="pageSectionMain ui-corner-all">
                <div class="pageSectionMainInternal">
                    <div id="pageHeader">
                        <h2>Liste des Serveurs</h2>
                    </div>
                    <div>
                        <script>
                            $(document).ready(function() {
                                $('#fileData').dataTable({
                                    "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
                                    "sPaginationType": "full_numbers",
                                    "aaSorting": [[1, "desc"]],
                                    "iDisplayLength": 10,
                                    "bJQueryUI": true,
                                    "sDom": '<"H"frlT>t<"F"ip>',
                                    //<"H"T><"clear">
                                    //"sDom": '<"top"i>rt<"bottom"flp><"clear">',

                                    "oTableTools": {
                                        "aButtons": [
                                            // "copy",
                                            "csv",
                                            "xls",
                                            {
                                                "sExtends": "pdf",
                                                "sPdfOrientation": "landscape",
                                                "sPdfMessage": ""
                                            },
                                            "print"
                                        ]
                                    },
                                    "aoColumns": [
                                        {"bSortable": false},
                                        null,
                                        null,
                                        null,
                                        null,
                                        null,
                                        {"bSortable": false}
                                    ]

                                });

                            });

                        </script>

                        <p class="introText">
<span style="color:#F00;">Soyez très prudent lors de la suppression d'un serveur car cela supprimera toutes les commandes qui appartienent à ce serveur.</span>
                        <p>Pour ajouter un serveur <a href="{{path('caisse_ajout_serveur')}}"> Cliquer içi </a></p>
                         
                        </p> 
                    </div>
                    <div class="clear"><!-- --></div>

                    <div>
                        <p class="introText">
                        <table id="fileData" width="100%" cellpadding="3" cellspacing="0">
                            <thead>
                           
                            <th style="width: 120px; text-align: left;" class="ui-state-default">Nom</th>
                            <th style="width: 120px; text-align: left;" class="ui-state-default">Prénom</th>
                             <th style="width: 120px; text-align: left;" class="ui-state-default">Adresse</th>
                             <th style="width: 120px; text-align: left;" class="ui-state-default">Telephone</th>
                                <th style="width: 120px; text-align: left;" class="ui-state-default">Username</th>
                           
                            <th style="width: 60px; text-align: center;" class="ui-state-default">Action</th>
                            
                            </thead>
                            <tbody>
                                 {% for serveur in serveurs %}
                                <tr>
                                   
                                    <td class="txtLeft">{{serveur.nom}}</td>
                                    <td class="txtLeft">{{serveur.prenom}}</td>
                                    <td class="txtLeft">{{serveur.adresse}}</td>
                                    <td class="txtLeft">{{serveur.tel}}</td>
                                    <td class="txtLeft">{{serveur.username}}</td>
                                    <td class="txtCenter" id="task1">
                                        <a href="{{path('caisse_modifier_serveur',{id:serveur.id})}}">
                                            <img src="/img/edit.png" width="16" height="16" title="Modifier le serveur" style="margin:1px;"/>
                                        </a> 

                                        <a href="{{path('caisse_supprimer_serveur',{id:serveur.id})}}" onClick="return confirm(\''.$LANG['alert_pr_del'].'\');">
                                            <img src="/img/delete.png" width="16" height="16" title="Supprimer le serveur" style="margin:1px;"/>
                                        </a>
                                    </td> 
                                </tr>
                                {% endfor %}
                            </tbody>
                        </table>
                        </p>
                        <div class="clear"></div>
                    </div>
                </div>
            </div>
            <div class="clear"><!-- --></div>
        </div>

        <div class="clr"></div>

    </div>
    <div class="clear"></div>

</div>

        

      

{% endblock body %} 